from . import index_bp
from flask import session, current_app, render_template
from info import redis_store


# 2.使用蓝图
@index_bp.route('/')
def hello_world():
    redis_store.set('name', 'LaoWang')
    session['name1'] = 'curry'
    return 'hello world! %s' %(session.get('name1'))


@index_bp.route('/favicon.ico')
def get_favicon():
    '''获取网站图标'''
    print('111')
    return current_app.send_static_file('info/module/static/news/favicon.ico')